Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

rework bitmap image rendering simulation #63

Merged

Conversation

ArchibaldBienetre
Copy link

Implements issue #60

MUST BE DONE AFTER #52 !

@ArchibaldBienetre ArchibaldBienetre marked this pull request as ready for review January 15, 2020 20:35
@@ -39,6 +39,8 @@ set -x

./erika.sh render_ascii_art -h
./erika.sh render_ascii_art -d -f ./tests/test_resources/test_ascii_art.txt
# FIXME
Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

To be done in #64

Comment on lines -140 to +149
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY,
exception_if_overprinted=False)
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY)
else:
# a bit hacky, as I'm mirroring behavior from ErikaImageRenderer - this kindof goes against the now-beautiful architecture :(
try:
# hacky: use exception to determine image type
image_for_provoking_exception = WrappedImage(args.file)
erika = MicrostepBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, output_after_each_step=True,
delay_after_each_step=DRY_RUN_DELAY, exception_if_overprinted=False)
erika = MicrostepBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY)
except NotAnImageException:
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY,
exception_if_overprinted=False)
erika = CharacterBasedErikaMock(DRY_RUN_WIDTH, DRY_RUN_HEIGHT, delay_after_each_step=DRY_RUN_DELAY)

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Sane defaults would be nice here, so that parameter-less ctor.
Limiting the hight might not make much sense, because we use endless paper with hardware.

Copy link
Author

@ArchibaldBienetre ArchibaldBienetre Jan 15, 2020

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

discussed:
To be done in #69

@ArchibaldBienetre ArchibaldBienetre merged commit ef0ce7f into master Jan 15, 2020
cyroxx pushed a commit to cyroxx/erika3004 that referenced this pull request Feb 1, 2020
…ure/rework-bitmap-image-rendering-simulation

rework bitmap image rendering simulation
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants